/*
 * ErrorState.hpp
 *
 *  Created on: 11 dec. 2012
 *      Author: Admin
 */

#ifndef ERRORSTATE_HPP_
#define ERRORSTATE_HPP_

#include "State.hpp"

/**
 * The state the robot enters when it detects an error.
 * The robot should enter this state when it exhibits unallowed behavior.
 *
 * The robot cannot leave this state.
 */
class ErrorState : public State
{
	/**
	 * Handles incoming events.
	 * This state should ignore all incoming events.
	 *
	 * @param the event that should be handled.
	 * @see Event.hpp
	 */
	virtual void handleEvent(Event& event);

	/**
	 * initialises state.
	 * Changes the robot's current state to ErorState
	 * Stops the engine.
	 * Starts the warning-light.
	 *
	 * @see Robot::getInstance().getEngine().stop();
	 */
	virtual void startState();

	/**
	 * Returns the state's type.
	 *
	 * @return State::ERROR
	 * @see StateType.hpp
	 */
	virtual StateType getStateType();
};

#endif /* ERRORSTATE_HPP_ */
